<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<html>
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<h1>Host List</h1>
		<input type="button" value="Add" onClick="window.location.href='toAdd.action'"/>
		<table border="1">
			<tr>
				<td>ID</td>
				<td>Name</td>
				<td>OS</td>
				<td>IP</td>
			</tr>
			<s:iterator value="hosts">
				<tr>
					<td><a href="view.action?host.id=<s:property value="id"/>"><s:property value="id"/></a></td>
					<td><s:property value="name"/></td>
					<td><s:property value="os"/></td>
					<td><s:property value="ip"/></td>
					<td>
						<input type="button" value="Edit" onClick="window.location.href='toEdit.action?host.id=<s:property value="id"/>'"/>
						<input type="button" value="Delete" onClick="window.location.href='delete.action?host.id=<s:property value="id"/>'"/>
					</td>
				</tr>
			</s:iterator>
		</table>
	</body>
</html>